/*
 * Título: gestHora. Aplicación web de gestión de horarios para conservatorios.
 * Alumnos:
 * - Javier Pardo Muñoz. I.T. Informática de Gestión
 * - Antonio Prior Cazorla. I.T. Informática de Gestión
 * Director: Dr. José Raúl Romero Salguero.
 *     
 *  Copyright (C) 2013 Javier Pardo Muñoz / Antonio Prior Cazorla
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.

 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package es.uco.gesthora.business.algoritmo;

import java.util.Vector;

public class Nodo {

    private int valor;
    private Vector solicitud;
    private Nodo hijo;
    private Nodo hermano;

    public Nodo() {
    }

    public Nodo(int valor, Vector solicitud) {
        this.valor = valor;
        this.solicitud = solicitud;
        hijo = null;
        hermano = null;
    }

    public void setValor(int valor) {
        this.valor = valor;
    }

    public void setHijo(Nodo hijo) {
        this.hijo = hijo;
    }

    public void setHermano(Nodo hermano) {
        this.hermano = hermano;
    }

    public void setSolicitud(Vector solicitud) {
        this.solicitud = solicitud;
    }

    public int getValor() {
        return valor;
    }

    public Nodo getHijo() {
        return hijo;
    }

    public Nodo getHermano() {
        return hermano;
    }

    public Vector getSolicitud() {
        return solicitud;
    }

    public String getStringSolicitud() {
        String cadena = "";
        for (int i = 0; i < getSolicitud().size(); i++) {
            cadena += getSolicitud().get(i).toString();
        }
        return cadena;
    }
}
